import React, { Component } from 'react'
import './SearchInput.scss'
import {withRouter} from 'react-router-dom'
 class SearchInput extends Component {
    //  跳转搜索页面
    goSearch=() => {
        this.props.history.push('/search')
    }
    // 跳转分类页面
    goCategory=() => {
        this.props.history.push('/category')
    }
    // 跳转聊天界面
    goChat=() => {
        this.props.history.push('/chat')
    }
    render() {
        return (
            <div className='yg-search-input'>
                <div className="search-left" onClick={this.goCategory}>
                    <i className='iconfont icon-fenlei1'></i>
                </div>
                <div className="search-center" onClick={this.goSearch}>
                    <i className='iconfont icon-fangdajing'></i>
                   <input placeholder='手提包女包新款'></input>
                </div>
                <div className="search-right" onClick={this.goChat}>
                    <i className='iconfont icon-icon-'></i>
                </div>
            </div>
        )
    }
}
export default withRouter(SearchInput)